package com.css.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.Arrays;

@Getter
@AllArgsConstructor
public enum ZhlbEnum {

    ZHLB_CUSTOMER("01", "顾客"),

    ZHLB_EMPLOYEE("02", "员工");


    private final String dm;

    private final String mc;
    public static String getMc(String dm) {
        ZhlbEnum res = Arrays.stream(values())
                .filter(x -> x.getDm().equals(dm))
                .findFirst().orElse(null);
        return res == null ? null : res.getMc();
    }
}
